package com.zlx.mall.basic.common.exception;


import com.zlx.mall.basic.common.enums.ResponseEnum;

/**
 * @author qingke
 **/
public class BizRuntimeException extends BaseRuntimeException {

    private static final ResponseEnum DEFAULT_STATUS = BaseResponseStatusEnum.FAILURE;

    public BizRuntimeException(Integer code, String message) {
        super(code, message);
    }

    public BizRuntimeException(Integer code, String message, Throwable cause) {
        super(code, message, cause);
    }

    public BizRuntimeException(Throwable cause) {
        super(DEFAULT_STATUS.getCode(), cause);
    }

    public BizRuntimeException(String message) {
        super(DEFAULT_STATUS.getCode(), message);
    }

    public BizRuntimeException(String message, Throwable cause) {
        super(DEFAULT_STATUS.getCode(), message, cause);
    }

    public BizRuntimeException(ResponseEnum status) {
        super(status.getCode(), status.getMessage());
    }

    public BizRuntimeException(ResponseEnum status, Throwable cause) {
        super(status.getCode(), status.getMessage(), cause);
    }




}
